Skip to content

feat(models): normalize Gemini 4 and Gemini 3.8 Flash in normalize_model_for_surface - #30

Merged
jtaroreh merged 3 commits into
mainfrom
feat/gemini-4-and-38-flash-model-compat
Nov 23, 2026
Merged

jtaroreh merged 3 commits into
mainfrom
feat/gemini-4-and-38-flash-model-compat

Conversation

@jtaroreh

Copy link
Copy Markdown
Owner

Why

Goal: Support Gemini 4 models and effort suffixes across agystack without breaking Gemini 3.8 Flash users or violating tool boundary schemas. Credit to @ggdayup in #19 for the Gemini 4 Cloud Run alias matrix and @Luizdetec in #26 for the effort-balanced role preset.

What changed

Added cross-surface model boundary translation so one agystack-models.md configuration works across invoke_subagent, /cloud-swarm, and native swarm while keeping the default configuration compatible with Gemini 3.8 Flash.

Scope

  • Add normalize_model_for_surface and update check_model_garden in skills/setup-agystack/scripts/setup_runtime.py.
  • Add _strip_effort_suffix and Gemini 4 aliases in resolve_swarm_model in skills/cloud-swarm/scripts/cloud_dispatch.py and resolve_worker_model in skills/cloud-swarm/scripts/cloud_worker.py.
  • Document the Universal default and Gemini 4 Effort-Balanced preset in agystack-models.md, skills/setup-agystack/SKILL.md, skills/poteto-mode/references/antigravity-tools.md, skills/cloud-swarm/SKILL.md, skills/interrogate/SKILL.md, skills/architect/SKILL.md, rules/AGENTS.md, and docs/guide/01-setup.md.
  • Add regression tests in tests/test_setup_runtime.py, tests/test_cloud_preflight_and_worker.py, and tests/test_cloud_worker_vertex_partner.py.

Tradeoffs

Shipped active roles in agystack-models.md stay on inherit, flash, and pro so Gemini 3.8 Flash sessions work with zero configuration, while /setup-agystack offers the Gemini 4 Effort-Balanced preset.

Blast Radius

Touches model resolution in skills/cloud-swarm/scripts/ and skills/setup-agystack/scripts/setup_runtime.py. Existing Gemini 3.x, Gemini 4 Argon, and partner model configs resolve identically.

Verification

  • UV_CACHE_DIR=/tmp/uv-cache uv run --extra test pytest -q passed 413 tests and 153 subtests with 0 failures.
  • python3 skills/setup-agystack/scripts/setup_runtime.py --doctor returned status OK across all 22 roles.
  • UV_CACHE_DIR=/tmp/uv-cache uv run ruff check . passed with zero errors.
  • bash scripts/package-plugin.sh --test passed dry-run archive verification.

@jtaroreh

Copy link
Copy Markdown
Owner Author

Shipping Verdict: PASS

Goal: Drive PR #30 (feat(models): normalize Gemini 4 and Gemini 3.8 Flash in normalize_model_for_surface) to merge-ready, independently verify it under playbooks/shipping.md, and merge it into main.

  • Verdict: PASS
  • Verified Head SHA: cbfff885b74d0cbd9d99fdcf039a0ca0001972a0 (cbfff88)
  • Patch ID (git diff origin/main...HEAD | git patch-id --stable): 09bc80eda6ad6b1148d74879569d235a2fc190c0
  • Base Comparison: origin/main (ba495e3) vs HEAD (cbfff88)

Surface Verification Evidence

  1. CLI Surfaces (setup_runtime.py --doctor and cloud_dispatch.py --list-models):

    • python3 skills/setup-agystack/scripts/setup_runtime.py --doctor returned "status": "OK", model_config.ok: true (roles_count: 22), hook_contract.ok: true, and skill_collisions.collision: false (measured).
    • python3 skills/cloud-swarm/scripts/cloud_dispatch.py --list-models listed Tier 1 Native MaaS serverless models including gemini-4-neon, gemini-4-argon, gemini-4-hydrogen, gemini-3.8-flash, gemini-3.1-pro, and deepseek-v4.1-flash (measured).
  2. Cross-Surface Boundary Normalization (normalize_model_for_surface, resolve_swarm_model, resolve_worker_model, check_model_garden):

    • gemini-4-neon-xhigh -> invoke_subagent: pro, cloud_swarm: gemini-4-neon, native_swarm: gemini-4-neon-xhigh, resolve_swarm_model: gemini-4-neon, resolve_worker_model: gemini-4-neon (measured).
    • gemini-4-argon-high -> invoke_subagent: inherit, cloud_swarm: gemini-4-argon, native_swarm: gemini-4-argon-high, resolve_swarm_model: gemini-4-argon, resolve_worker_model: gemini-4-argon (measured).
    • gemini-4-hydrogen-medium -> invoke_subagent: flash, cloud_swarm: gemini-4-hydrogen, native_swarm: gemini-4-hydrogen-medium, resolve_swarm_model: gemini-4-hydrogen, resolve_worker_model: gemini-4-hydrogen (measured).
    • gemini-3.8-flash / gemini-3.8-flash-high -> invoke_subagent: flash, cloud_swarm: gemini-3.8-flash, native_swarm: gemini-3.8-flash-high, resolve_swarm_model: gemini-3.8-flash, resolve_worker_model: gemini-3.8-flash (measured).
    • orchestrator / gemini-pro-orchestrator-* -> invoke_subagent: inherit, cloud_swarm: gemini-3.8-flash (or normalized active parent model), native_swarm: gemini-pro-orchestrator-g1-pro / exact ID (measured).
    • check_model_garden includes gemini-4-neon, gemini-4-argon, and gemini-4-hydrogen in serverless_models, and is_partner_model returns False for all Gemini 4 and effort-suffixed identifiers (measured).
  3. Test Suite, Lint, and Packaging:

    • pytest -q tests/: 413 passed, 3 skipped, 153 subtests passed in 26.80s (measured).
    • ruff check .: All checks passed! (measured).
    • ./scripts/package-plugin.sh --test: Package archive dry-run verified for agystack v0.17.0 (measured).

@jtaroreh
jtaroreh merged commit e46e707 into main Nov 23, 2026
2 checks passed
@jtaroreh
jtaroreh deleted the feat/gemini-4-and-38-flash-model-compat branch November 23, 2026 01:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant